//
//  BTSendData.m
//  BTDemo
//
//  Created by Avery on 14-8-22.
//  Copyright (c) 2014年 Alvin. All rights reserved.
//

#import "BTSendData.h"

@implementation BTSendData

- (id)initWithCmdData:(NSData *) data{
    self = [super init];
    if(self)
    {
        self.characteristic = nil;
        self.value          = data;
        _responseDatas      = [[NSMutableArray alloc] init];
        _responseTimeout    = 99999.f;
    }
    
    return self;
}
#pragma mark -- Public Method
- (void)callBackResponseModel
{
    if(self.responseModel)
    {
        id entity = [self.responseModel getInstanceWithNSDatas:_responseDatas];
        self.responseCallBack(nil,entity);
        return;
    }else{
        self.responseCallBack(nil,_responseDatas[0]);
    }
}

@end
